//
//  SpatialSearchHandler.h
//  dataGathering
//
//  Created by apple on 14/12/23.
//  Copyright (c) 2014年 shuili. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <ArcGIS/ArcGIS.h>
#import "SearchBaseMode.h"

typedef NS_ENUM(NSUInteger, SpatialSearchMode) {
    SpatialSearchModeRectangle = 0,
    SpatialSearchModePolygon,
    SpatialSearchModeSketch,
    SpatialSearchModeLine,
    SpatialSearchModeBufferArea,
};

@class SpatialSearchHandler;
@protocol SpatialSearchHandlerProtocol <NSObject>

@required
- (void)SpatialSearchHandler:(SpatialSearchHandler *)handler didFinishDrawing:(AGSGeometry *)geometry :(SpatialSearchMode)mode;

@end

@interface SpatialSearchHandler : NSObject<SearchBaseModeEndDrawingDelegate>

@property (nonatomic, weak) id <SpatialSearchHandlerProtocol> delegate;

-(instancetype)initWithMapView :(AGSMapView*)mapview;
-(void)setMode :(SpatialSearchMode)mode;
-(void)stop;

@end
